package com.gecba.system.dao.repository;

import com.gecba.modular.jpa.repository.BaseRepository;
import com.gecba.system.entity.SysUserRole;

import java.util.List;

/**
 * @author ChenBo
 * @interfaceName SysUserRoleRepository
 * @date 2021/7/25
 */
public interface SysUserRoleRepository extends BaseRepository<SysUserRole, Long> {

    /**
     * 根据用户ID列表查询
     * @param userIdList
     * @return
     */
    List<SysUserRole> findAllByUserIdIn(List<Long> userIdList);

    /**
     * 根据用户id删除
     * @param id
     * @return
     */
    int deleteByUserId(Long id);
}
